From fb42a1766a4d3a5b7b93ed99f8ab038d963e4eab Mon Sep 17 00:00:00 2001 From: "Jan D." Date: Mon, 5 May 2014 19:37:43 +0200 Subject: [PATCH] * nsselect.m (Fx_selection_exists_p): Just return Qnil if window system not initialized. --- src/ChangeLog | 5 +++++ src/nsselect.m | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index d1e68ad4155..ebb0e112944 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2014-05-05 Jan Djärv + + * nsselect.m (Fx_selection_exists_p): Just return Qnil if window system + not initialized (Bug#17398). + 2014-05-04 Paul Eggert Revert recent libpng changes (Bug#17339). diff --git a/src/nsselect.m b/src/nsselect.m index f4713cb5e10..038849c0aed 100644 --- a/src/nsselect.m +++ b/src/nsselect.m @@ -429,7 +429,9 @@ On Nextstep, TERMINAL is unused. */) id pb; NSArray *types; - check_window_system (NULL); + if (!window_system_available (NULL)) + return Qnil; + CHECK_SYMBOL (selection); if (EQ (selection, Qnil)) selection = QPRIMARY; if (EQ (selection, Qt)) selection = QSECONDARY; -- 2.30.2